
function pm_getcookie(c_name) {
	var start = document.cookie.indexOf(c_name + "=");
	var len = start + c_name.length + 1;
	if ((!start) && (c_name != document.cookie.substring(0, c_name.length)))
		return null;

	if (start == -1)
		return null;

	var end = document.cookie.indexOf(";", len);
	if (end == -1)
		end = document.cookie.length;
	return unescape(document.cookie.substring(len, end));
}
function pm_savecookie(c_name, c_value) {
	// Cookie过期期限，单位：天
	var expDays = 3650 * 24 * 60 * 60 * 1000;
	var expDate = new Date();
	expDate.setTime(expDate.getTime() + expDays);
	var expString = (";expires=" + expDate.toGMTString());
	var pathString = ";path=/";
	document.cookie = c_name + "=" + escape(c_value) + expString + pathString;
}
function pm_removecookie(c_name){
	
	pm_saveCookie(c_name, "");
}